Data Import,remove ‘Keshavarz4_urine’, ‘Keshavarz4_tissue’, ‘Hong8’, ‘Marotta23’ study due to large 95% CI

setwd("~/Desktop/meta analysis/BPA_cancer")

# load the data with strongest effect of OR
meta_data_s_remove <- read_excel("data.xlsx", sheet = "strong_or") %>% 
  janitor::clean_names() %>% 
  filter(!(auther %in% c('Keshavarz4_urine', 'Keshavarz4_tissue', 'Hong8', 'Marotta23'))) 

# load the data with average effect of OR
meta_data_a_remove <- read_excel("data.xlsx", sheet = "average_or") %>% 
  janitor::clean_names() %>% 
  filter(!(auther %in% c('Keshavarz4_urine', 'Keshavarz4_tissue', 'Hong8', 'Marotta23'))) 

# Calculate the log of odds ratios and their standard errors
# strong effect of OR
meta_data_s_remove <- meta_data_s_remove %>% 
  mutate(
    log_odds_ratio = log(or),
    lower_log =log(lower_ci),
    upper_log = log(upper_ci),
    se_log_odds_ratio = (upper_log - lower_log) / (2 * 1.96) # 1.96 is the Z value for 95% CI
  )

# average OR
meta_data_a_remove <-meta_data_a_remove %>% 
  mutate(
    log_odds_ratio = log(or),
    lower_log =log(lower_ci),
    upper_log = log(upper_ci),
    se_log_odds_ratio = (upper_log - lower_log) / (2 * 1.96) # 1.96 is the Z value for 95% CI
  )

Part 1, general meta analysis

# strong effect OR
meta_s_analysis_remove <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = meta_data_s_remove,
  sm = "OR"
)

summary(meta_s_analysis_remove)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.9500 [0.7479; 1.2067]        5.2        7.2
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        5.3
## Tse9_mult         1.8800 [1.2379; 2.8551]        1.7        6.0
## Loperz10_mult     2.3100 [1.4284; 3.7357]        1.3        5.6
## Trabert11         1.0400 [0.9172; 1.1792]       18.7        7.7
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        4.2
## Marotta15         2.8600 [0.8533; 9.5862]        0.2        2.2
## Deng16            1.5800 [1.3973; 1.7866]       19.6        7.7
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        3.0
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.4
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.5
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.4        3.6
## Ahrens22          2.1000 [1.0127; 4.3546]        0.6        4.1
## Qu24              1.2800 [1.1701; 1.4002]       36.7        7.8
## Chen25_mult       2.0900 [1.1543; 3.7841]        0.8        4.9
## Li26_mult         1.9100 [1.3912; 2.6222]        2.9        6.7
## Parada27_mult     0.8000 [0.5583; 1.1464]        2.3        6.4
## stro              1.4100 [1.0805; 1.8400]        4.2        7.0
## Duan31_mult       1.5700 [1.1493; 2.1447]        3.0        6.7
## 
## Number of studies: k = 19
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2902 [1.2219; 1.3623] 9.18 < 0.0001
## Random effects model 1.3312 [1.0776; 1.6446] 2.65   0.0080
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1473 [0.0622; 0.5378]; tau = 0.3838 [0.2495; 0.7334]
##  I^2 = 77.8% [65.8%; 85.6%]; H = 2.12 [1.71; 2.63]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  81.08   18 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
# average OR
meta_a_analysis_remove <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = meta_data_a_remove,
  sm = "OR"
)

summary(meta_a_analysis_remove)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.8950 [0.7079; 1.1316]        5.4        7.7
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        5.1
## Tse9_mult         1.7700 [1.1655; 2.6881]        1.7        6.0
## Loperz10_mult     1.5200 [0.9089; 2.5419]        1.1        5.2
## Trabert11         1.0400 [0.9172; 1.1792]       18.8        8.4
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        3.9
## Marotta15         2.8600 [0.8533; 9.5862]        0.2        1.8
## Deng16            1.5800 [1.3973; 1.7866]       19.7        8.4
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        2.6
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.0
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.2
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.4        3.2
## Ahrens22          2.1000 [1.0127; 4.3546]        0.6        3.7
## Qu24              1.2800 [1.1701; 1.4002]       36.9        8.6
## Chen25_mult       2.0700 [1.1061; 3.8738]        0.8        4.4
## Li26_mult         1.1800 [0.8472; 1.6434]        2.7        6.8
## Parada27_mult     0.7680 [0.5351; 1.1022]        2.3        6.6
## Jia28             1.4100 [1.0805; 1.8400]        4.2        7.4
## Duan31_mult       1.4730 [1.0750; 2.0183]        3.0        7.0
## 
## Number of studies: k = 19
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2547 [1.1882; 1.3250] 8.16 < 0.0001
## Random effects model 1.2328 [1.0255; 1.4822] 2.23   0.0259
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1007 [0.0421; 0.4776]; tau = 0.3173 [0.2053; 0.6911]
##  I^2 = 74.8% [60.5%; 83.9%]; H = 1.99 [1.59; 2.49]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  71.29   18 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
# Forest plot
# strong effect of OR
# pdf(file = "forestplot_strongeffect.pdf", width = 12, height = 10), use to save the forest plot
forest(meta_s_analysis_remove, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

# average OR
# pdf(file = "forestplot_average.pdf", width = 12, height = 10)
forest(meta_a_analysis_remove, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

# dev.off(), use to save the forest plot

Assess the publication bias of general meta analysis

# Funnel plot
# strong effect of OR
# pdf(file = "funnelplot_strongeffect.pdf", width = 12, height = 10)
funnel(meta_s_analysis_remove)

# average OR
# pdf(file = "funnelplot_average.pdf", width = 12, height = 10)
funnel(meta_a_analysis_remove)

# dev.off()

# assess the asymmetry of funnel plot and publication bias
# Conduct the meta-analysis using rma() function from metafor
# strong effect of OR
meta_s_analysis_rma <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = meta_data_s_remove)

# Perform Egger's test for publication bias
eggers_test_s <- regtest(meta_s_analysis_rma, model = "lm")

# Output the results of Egger's test
summary(meta_s_analysis_rma)
## 
## Random-Effects Model (k = 19; tau^2 estimator: REML)
## 
##   logLik  deviance       AIC       BIC      AICc   
## -14.0124   28.0248   32.0248   33.8055   32.8248   
## 
## tau^2 (estimated amount of total heterogeneity): 0.1473 (SE = 0.0696)
## tau (square root of estimated tau^2 value):      0.3838
## I^2 (total heterogeneity / total variability):   89.29%
## H^2 (total variability / sampling variability):  9.34
## 
## Test for Heterogeneity:
## Q(df = 18) = 81.0760, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub     
##   0.2861  0.1079  2.6526  0.0080  0.0747  0.4975  ** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(eggers_test_s$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.6143 -2.1381  0.5684  1.5165  3.3439 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt  0.23185    0.09063   2.558   0.0204 *
## Xsei      0.25441    0.74939   0.339   0.7384  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.176 on 17 degrees of freedom
## Multiple R-squared:  0.5131, Adjusted R-squared:  0.4558 
## F-statistic: 8.958 on 2 and 17 DF,  p-value: 0.002203
# average OR
meta_a_analysis_rma <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = meta_data_a_remove)

# Perform Egger's test for publication bias
eggers_test_a <- regtest(meta_a_analysis_rma, model = "lm")

# Output the results of Egger's test
summary(meta_a_analysis_rma)
## 
## Random-Effects Model (k = 19; tau^2 estimator: REML)
## 
##   logLik  deviance       AIC       BIC      AICc   
## -12.7095   25.4189   29.4189   31.1997   30.2189   
## 
## tau^2 (estimated amount of total heterogeneity): 0.1007 (SE = 0.0517)
## tau (square root of estimated tau^2 value):      0.3173
## I^2 (total heterogeneity / total variability):   85.00%
## H^2 (total variability / sampling variability):  6.67
## 
## Test for Heterogeneity:
## Q(df = 18) = 71.2902, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub    
##   0.2093  0.0940  2.2274  0.0259  0.0251  0.3935  * 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(eggers_test_a$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.2693 -1.7941  0.3362  1.4424  3.6321 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt  0.23617    0.08501   2.778   0.0129 *
## Xsei     -0.10277    0.70154  -0.146   0.8853  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.047 on 17 degrees of freedom
## Multiple R-squared:  0.4838, Adjusted R-squared:  0.4231 
## F-statistic: 7.966 on 2 and 17 DF,  p-value: 0.003623
# Begg's Test
# strong effect of OR
begg_test_s <- ranktest(meta_s_analysis_rma)
print(begg_test_s)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.0409, p = 0.8360
# average OR
begg_test_a <- ranktest(meta_a_analysis_rma)
print(begg_test_a)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.0760, p = 0.6787
# Trim and Fill Method
# strong effect of OR
trimfill_result_s <- trimfill(meta_s_analysis_rma, estimator = "R0")
print(trimfill_result_s)
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 19; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.1473 (SE = 0.0696)
## tau (square root of estimated tau^2 value):      0.3838
## I^2 (total heterogeneity / total variability):   89.29%
## H^2 (total variability / sampling variability):  9.34
## 
## Test for Heterogeneity:
## Q(df = 18) = 81.0760, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub     
##   0.2861  0.1079  2.6526  0.0080  0.0747  0.4975  ** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# average OR
trimfill_result_a <- trimfill(meta_a_analysis_rma, estimator = "R0")
print(trimfill_result_a)
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 19; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.1007 (SE = 0.0517)
## tau (square root of estimated tau^2 value):      0.3173
## I^2 (total heterogeneity / total variability):   85.00%
## H^2 (total variability / sampling variability):  6.67
## 
## Test for Heterogeneity:
## Q(df = 18) = 71.2902, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub    
##   0.2093  0.0940  2.2274  0.0259  0.0251  0.3935  * 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Part 2, subgroup region, China vs None-China

# subgroup - nation 
# strong effect OR
meta_data_s_na <- meta_data_s_remove %>% 
  mutate(
    region_code = ifelse(region == "China", 0, 1)
  )

meta_s_analysis_china <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_s_na, region_code == "0"), # China
  sm = "OR"
)


meta_s_analysis_other <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_s_na, region_code == "1"), # other region
  sm = "OR"
)

summary(meta_s_analysis_china)
##                 OR           95%-CI %W(common) %W(random)
## Tse9_mult   1.8800 [1.2379; 2.8551]        2.4       10.8
## Zhang14     0.3800 [0.1888; 0.7650]        0.9        6.9
## Deng16      1.5800 [1.3973; 1.7866]       28.0       15.3
## Zhou17      3.5700 [1.3702; 9.3013]        0.5        4.6
## Qu24        1.2800 [1.1701; 1.4002]       52.5       15.6
## Chen25_mult 2.0900 [1.1543; 3.7841]        1.2        8.2
## Li26_mult   1.9100 [1.3912; 2.6222]        4.2       12.5
## stro        1.4100 [1.0805; 1.8400]        6.0       13.4
## Duan31_mult 1.5700 [1.1493; 2.1447]        4.3       12.6
## 
## Number of studies: k = 9
## 
##                          OR           95%-CI     z  p-value
## Common effect model  1.4145 [1.3254; 1.5095] 10.45 < 0.0001
## Random effects model 1.5121 [1.1851; 1.9294]  3.33   0.0009
## 
## Quantifying heterogeneity:
##  tau^2 = 0.0970 [0.0360; 1.1774]; tau = 0.3115 [0.1897; 1.0851]
##  I^2 = 75.3% [52.3%; 87.2%]; H = 2.01 [1.45; 2.79]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  32.35    8 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_s_analysis_other)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.9500 [0.7479; 1.2067]       17.2       15.9
## Morgan3           0.7600 [0.4471; 1.2917]        3.5       11.4
## Loperz10_mult     2.3100 [1.4284; 3.7357]        4.3       12.2
## Trabert11         1.0400 [0.9172; 1.1792]       62.3       17.2
## Marotta15         2.8600 [0.8533; 9.5862]        0.7        4.6
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.7        5.0
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.4        3.1
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        1.5        7.7
## Ahrens22          2.1000 [1.0127; 4.3546]        1.8        8.7
## Parada27_mult     0.8000 [0.5583; 1.1464]        7.6       14.2
## 
## Number of studies: k = 10
## 
##                          OR           95%-CI    z p-value
## Common effect model  1.0417 [0.9433; 1.1503] 0.81  0.4200
## Random effects model 1.1417 [0.8446; 1.5433] 0.86  0.3889
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1334 [0.0159; 0.7626]; tau = 0.3653 [0.1259; 0.8733]
##  I^2 = 61.1% [22.5%; 80.5%]; H = 1.60 [1.14; 2.27]
## 
## Test of heterogeneity:
##      Q d.f. p-value
##  23.16    9  0.0058
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_s_analysis_remove)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.9500 [0.7479; 1.2067]        5.2        7.2
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        5.3
## Tse9_mult         1.8800 [1.2379; 2.8551]        1.7        6.0
## Loperz10_mult     2.3100 [1.4284; 3.7357]        1.3        5.6
## Trabert11         1.0400 [0.9172; 1.1792]       18.7        7.7
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        4.2
## Marotta15         2.8600 [0.8533; 9.5862]        0.2        2.2
## Deng16            1.5800 [1.3973; 1.7866]       19.6        7.7
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        3.0
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.4
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.5
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.4        3.6
## Ahrens22          2.1000 [1.0127; 4.3546]        0.6        4.1
## Qu24              1.2800 [1.1701; 1.4002]       36.7        7.8
## Chen25_mult       2.0900 [1.1543; 3.7841]        0.8        4.9
## Li26_mult         1.9100 [1.3912; 2.6222]        2.9        6.7
## Parada27_mult     0.8000 [0.5583; 1.1464]        2.3        6.4
## stro              1.4100 [1.0805; 1.8400]        4.2        7.0
## Duan31_mult       1.5700 [1.1493; 2.1447]        3.0        6.7
## 
## Number of studies: k = 19
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2902 [1.2219; 1.3623] 9.18 < 0.0001
## Random effects model 1.3312 [1.0776; 1.6446] 2.65   0.0080
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1473 [0.0622; 0.5378]; tau = 0.3838 [0.2495; 0.7334]
##  I^2 = 77.8% [65.8%; 85.6%]; H = 2.12 [1.71; 2.63]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  81.08   18 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
# average OR
meta_data_a_na <- meta_data_a_remove %>% 
  mutate(
    region_code = ifelse(region == "China", 0, 1)
  )

meta_a_analysis_china <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_a_na, region_code == "0"), # China
  sm = "OR"
)

meta_a_analysis_other <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_a_na, region_code == "1"), # other region
  sm = "OR"
)

summary(meta_a_analysis_china)
##                 OR           95%-CI %W(common) %W(random)
## Tse9_mult   1.7700 [1.1655; 2.6881]        2.4       10.0
## Zhang14     0.3800 [0.1888; 0.7650]        0.9        5.4
## Deng16      1.5800 [1.3973; 1.7866]       28.2       17.8
## Zhou17      3.5700 [1.3702; 9.3013]        0.5        3.3
## Qu24        1.2800 [1.1701; 1.4002]       52.8       18.5
## Chen25_mult 2.0700 [1.1061; 3.8738]        1.1        6.3
## Li26_mult   1.1800 [0.8472; 1.6434]        3.9       12.2
## Jia28       1.4100 [1.0805; 1.8400]        6.0       14.0
## Duan31_mult 1.4730 [1.0750; 2.0183]        4.3       12.6
## 
## Number of studies: k = 9
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.3801 [1.2930; 1.4731] 9.68 < 0.0001
## Random effects model 1.4006 [1.1574; 1.6949] 3.46   0.0005
## 
## Quantifying heterogeneity:
##  tau^2 = 0.0492 [0.0273; 1.1477]; tau = 0.2218 [0.1652; 1.0713]
##  I^2 = 71.6% [44.1%; 85.6%]; H = 1.88 [1.34; 2.64]
## 
## Test of heterogeneity:
##      Q d.f. p-value
##  28.22    8  0.0004
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_a_analysis_other)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.8950 [0.7079; 1.1316]       17.9       21.8
## Morgan3           0.7600 [0.4471; 1.2917]        3.5        9.0
## Loperz10_mult     1.5200 [0.9089; 2.5419]        3.7        9.4
## Trabert11         1.0400 [0.9172; 1.1792]       62.3       28.9
## Marotta15         2.8600 [0.8533; 9.5862]        0.7        2.2
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.7        2.4
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.4        1.4
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        1.5        4.5
## Ahrens22          2.1000 [1.0127; 4.3546]        1.8        5.5
## Parada27_mult     0.7680 [0.5351; 1.1022]        7.5       14.8
## 
## Number of studies: k = 10
## 
##                          OR           95%-CI    z p-value
## Common effect model  1.0068 [0.9118; 1.1117] 0.13  0.8933
## Random effects model 1.0134 [0.8409; 1.2212] 0.14  0.8891
## 
## Quantifying heterogeneity:
##  tau^2 = 0.0272 [0.0000; 0.6208]; tau = 0.1649 [0.0000; 0.7879]
##  I^2 = 43.6% [0.0%; 72.9%]; H = 1.33 [1.00; 1.92]
## 
## Test of heterogeneity:
##      Q d.f. p-value
##  15.94    9  0.0680
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_a_analysis_remove)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.8950 [0.7079; 1.1316]        5.4        7.7
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        5.1
## Tse9_mult         1.7700 [1.1655; 2.6881]        1.7        6.0
## Loperz10_mult     1.5200 [0.9089; 2.5419]        1.1        5.2
## Trabert11         1.0400 [0.9172; 1.1792]       18.8        8.4
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        3.9
## Marotta15         2.8600 [0.8533; 9.5862]        0.2        1.8
## Deng16            1.5800 [1.3973; 1.7866]       19.7        8.4
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        2.6
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.0
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.2
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.4        3.2
## Ahrens22          2.1000 [1.0127; 4.3546]        0.6        3.7
## Qu24              1.2800 [1.1701; 1.4002]       36.9        8.6
## Chen25_mult       2.0700 [1.1061; 3.8738]        0.8        4.4
## Li26_mult         1.1800 [0.8472; 1.6434]        2.7        6.8
## Parada27_mult     0.7680 [0.5351; 1.1022]        2.3        6.6
## Jia28             1.4100 [1.0805; 1.8400]        4.2        7.4
## Duan31_mult       1.4730 [1.0750; 2.0183]        3.0        7.0
## 
## Number of studies: k = 19
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2547 [1.1882; 1.3250] 8.16 < 0.0001
## Random effects model 1.2328 [1.0255; 1.4822] 2.23   0.0259
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1007 [0.0421; 0.4776]; tau = 0.3173 [0.2053; 0.6911]
##  I^2 = 74.8% [60.5%; 83.9%]; H = 1.99 [1.59; 2.49]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  71.29   18 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
# Forest plot
# strong effect of OR
#pdf(file = "forestplot_strongeffect_china.pdf", width = 12, height = 10)
forest(meta_s_analysis_china, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

#pdf(file = "forestplot_strongeffect_otherregion.pdf", width = 12, height = 10)
forest(meta_s_analysis_other, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

# average OR
#pdf(file = "forestplot_average_china.pdf", width = 12, height = 10)
forest(meta_a_analysis_china, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

#pdf(file = "forestplot_average_otherregion.pdf", width = 12, height = 10)
forest(meta_a_analysis_other, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

#dev.off()

Assess the publication bias of subgroup - China

# Funnel plot
# strong effect of OR
# pdf(file = "funnelplot_strongeffect_china.pdf", width = 12, height = 10)
funnel(meta_s_analysis_china)

# pdf(file = "funnelplot_strongeffect_otherregion.pdf", width = 12, height = 10)
funnel(meta_s_analysis_other)

# average OR
# pdf(file = "funnelplot_average_china.pdf", width = 12, height = 10)
funnel(meta_a_analysis_china)

# pdf(file = "funnelplot_average_otherregion.pdf", width = 12, height = 10)
funnel(meta_a_analysis_other)

# dev.off()
# assess the asymmetry of funnel plot and publication bias
# Conduct the meta-analysis using rma() function from metafor
# strong effect of OR
meta_s_analysis_rma_china <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_s_na, region_code == "0"))

# Perform Egger's test for publication bias
eggers_test_s_china <- regtest(meta_s_analysis_rma_china, model = "lm")

# Output the results of Egger's test
summary(eggers_test_s_china$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.3260 -0.3764  0.6767  1.2026  1.9604 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt   0.2829     0.1095   2.583   0.0363 *
## Xsei       0.8230     1.1004   0.748   0.4789  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.069 on 7 degrees of freedom
## Multiple R-squared:  0.7884, Adjusted R-squared:  0.728 
## F-statistic: 13.04 on 2 and 7 DF,  p-value: 0.004355
# average OR
meta_a_analysis_rma_china <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_a_na, region_code == "0"))

# Perform Egger's test for publication bias
eggers_test_a_china <- regtest(meta_a_analysis_rma_china, model = "lm")

# Output the results of Egger's test
summary(eggers_test_a_china$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.8134 -1.0655  0.2727  1.0738  2.2181 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt   0.3023     0.1055   2.867   0.0241 *
## Xsei       0.2560     1.0565   0.242   0.8154  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.999 on 7 degrees of freedom
## Multiple R-squared:  0.7706, Adjusted R-squared:  0.705 
## F-statistic: 11.76 on 2 and 7 DF,  p-value: 0.005784
# Begg's Test
# strong effect of OR
begg_test_s_china <- ranktest(meta_s_analysis_rma_china)
print(begg_test_s_china)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.1111, p = 0.7614
# average OR
begg_test_a_china <- ranktest(meta_a_analysis_rma_china)
print(begg_test_a_china)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.1667, p = 0.6122
# Trim and Fill Method
# strong effect of OR
trimfill_result_s_china <- trimfill(meta_s_analysis_rma_china, estimator = "R0")
summary(trimfill_result_s_china)
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 9; tau^2 estimator: REML)
## 
##   logLik  deviance       AIC       BIC      AICc   
##  -5.9479   11.8957   15.8957   16.0546   18.2957   
## 
## tau^2 (estimated amount of total heterogeneity): 0.0970 (SE = 0.0672)
## tau (square root of estimated tau^2 value):      0.3115
## I^2 (total heterogeneity / total variability):   87.54%
## H^2 (total variability / sampling variability):  8.03
## 
## Test for Heterogeneity:
## Q(df = 8) = 32.3466, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub      
##   0.4135  0.1243  3.3260  0.0009  0.1698  0.6572  *** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# average OR
trimfill_result_a_china <- trimfill(meta_a_analysis_rma_china, estimator = "R0")
summary(trimfill_result_a_china)
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 9; tau^2 estimator: REML)
## 
##   logLik  deviance       AIC       BIC      AICc   
##  -5.6519   11.3038   15.3038   15.4627   17.7038   
## 
## tau^2 (estimated amount of total heterogeneity): 0.0492 (SE = 0.0400)
## tau (square root of estimated tau^2 value):      0.2218
## I^2 (total heterogeneity / total variability):   77.88%
## H^2 (total variability / sampling variability):  4.52
## 
## Test for Heterogeneity:
## Q(df = 8) = 28.2157, p-val = 0.0004
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub      
##   0.3369  0.0973  3.4618  0.0005  0.1461  0.5276  *** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Assess the publication bias of subgroup - other region

# assess the asymmetry of funnel plot and publication bias
# Conduct the meta-analysis using rma() function from metafor
# strong effect of OR
meta_s_analysis_rma_other <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_a_na, region_code == "1"))

# Perform Egger's test for publication bias
eggers_test_s_other <- regtest(meta_s_analysis_rma_other, model = "lm")

# Output the results of Egger's test
summary(eggers_test_s_other$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.6470 -1.1947  0.1187  1.2256  1.7021 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)
## Xintrcpt -0.04115    0.10455  -0.394    0.704
## Xsei      0.40244    0.65356   0.616    0.555
## 
## Residual standard error: 1.379 on 8 degrees of freedom
## Multiple R-squared:  0.04633,    Adjusted R-squared:  -0.1921 
## F-statistic: 0.1943 on 2 and 8 DF,  p-value: 0.8272
# average OR
meta_a_analysis_rma_other <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_a_na, region_code == "0"))

# Perform Egger's test for publication bias
eggers_test_a_other <- regtest(meta_a_analysis_rma_other, model = "lm")

# Output the results of Egger's test
summary(eggers_test_a_other$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.8134 -1.0655  0.2727  1.0738  2.2181 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt   0.3023     0.1055   2.867   0.0241 *
## Xsei       0.2560     1.0565   0.242   0.8154  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.999 on 7 degrees of freedom
## Multiple R-squared:  0.7706, Adjusted R-squared:  0.705 
## F-statistic: 11.76 on 2 and 7 DF,  p-value: 0.005784
# Begg's Test
# strong effect of OR
begg_test_s_other <- ranktest(meta_s_analysis_rma_other)
begg_test_s_other
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.1556, p = 0.6007
# average OR
begg_test_a_other <- ranktest(meta_a_analysis_rma_other)
begg_test_a_other
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.1667, p = 0.6122
# Trim and Fill Method
# strong effect of OR
trimfill_result_s_other <- trimfill(meta_s_analysis_rma_other, estimator = "R0")
trimfill_result_s_other
## 
## Estimated number of missing studies on the left side: 1 (SE = 2.0000)
## Test of H0: no missing studies on the left side:      p-val = 0.2500
## 
## Random-Effects Model (k = 11; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.0313 (SE = 0.0388)
## tau (square root of estimated tau^2 value):      0.1770
## I^2 (total heterogeneity / total variability):   41.56%
## H^2 (total variability / sampling variability):  1.71
## 
## Test for Heterogeneity:
## Q(df = 10) = 19.0183, p-val = 0.0400
## 
## Model Results:
## 
## estimate      se     zval    pval    ci.lb   ci.ub    
##  -0.0090  0.0977  -0.0925  0.9263  -0.2005  0.1825    
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# average OR
trimfill_result_a_other <- trimfill(meta_a_analysis_rma_other, estimator = "R0")
trimfill_result_a_other
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 9; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.0492 (SE = 0.0400)
## tau (square root of estimated tau^2 value):      0.2218
## I^2 (total heterogeneity / total variability):   77.88%
## H^2 (total variability / sampling variability):  4.52
## 
## Test for Heterogeneity:
## Q(df = 8) = 28.2157, p-val = 0.0004
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub      
##   0.3369  0.0973  3.4618  0.0005  0.1461  0.5276  *** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Part 3, subgroup study design, cross sectional vs case control

# re-code the data
# strong effect of OR
meta_data_s_sen <- meta_data_s_remove %>% 
  mutate(
    study_design = factor(study_design, levels = c(0, 1), labels = c("case-control", "cross-sectional"))
  )

# average OR
meta_data_a_sen <- meta_data_a_remove %>% 
  mutate(
    study_design = factor(study_design, levels = c(0, 1), labels = c("case-control", "cross-sectional"))
  )
# strong effect of OR 
# case control study
meta_s_analysis_cc <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_s_sen, study_design == "case-control"),
  sm = "OR"
)

# cross sectional study
meta_s_analysis_cs <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_s_sen, study_design == "cross-sectional"),
  sm = "OR"
)

# average OR 
# case control study
meta_a_analysis_cc <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_a_sen, study_design == "case-control"),
  sm = "OR"
)

# cross sectional study
meta_a_analysis_cs <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_a_sen, study_design == "cross-sectional"),
  sm = "OR"
)

# Summary of the meta-analysis
# strong effect of OR
summary(meta_s_analysis_cc)
##                   OR           95%-CI %W(common) %W(random)
## Wu2_multi     0.9500 [0.7479; 1.2067]        5.3        8.5
## Tse9_mult     1.8800 [1.2379; 2.8551]        1.7        7.1
## Loperz10_mult 2.3100 [1.4284; 3.7357]        1.3        6.5
## Trabert11     1.0400 [0.9172; 1.1792]       19.1        9.1
## Zhang14       0.3800 [0.1888; 0.7650]        0.6        4.9
## Deng16        1.5800 [1.3973; 1.7866]       20.0        9.1
## Zhou17        3.5700 [1.3702; 9.3013]        0.3        3.4
## Ahrens22      2.1000 [1.0127; 4.3546]        0.6        4.7
## Qu24          1.2800 [1.1701; 1.4002]       37.5        9.3
## Chen25_mult   2.0900 [1.1543; 3.7841]        0.9        5.6
## Li26_mult     1.9100 [1.3912; 2.6222]        3.0        7.9
## Parada27_mult 0.8000 [0.5583; 1.1464]        2.3        7.6
## stro          1.4100 [1.0805; 1.8400]        4.3        8.3
## Duan31_mult   1.5700 [1.1493; 2.1447]        3.1        7.9
## 
## Number of studies: k = 14
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2999 [1.2304; 1.3734] 9.36 < 0.0001
## Random effects model 1.3978 [1.1185; 1.7467] 2.94   0.0032
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1375 [0.0620; 0.6616]; tau = 0.3707 [0.2490; 0.8134]
##  I^2 = 81.9% [70.7%; 88.8%]; H = 2.35 [1.85; 2.99]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  71.69   13 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_s_analysis_cs)
##                       OR           95%-CI %W(common) %W(random)
## Morgan3           0.7600 [0.4471; 1.2917]       51.5       37.1
## Marotta15         2.8600 [0.8533; 9.5862]        9.9       14.1
## Morgan20_cervical 1.3300 [0.4216; 4.1957]       11.0       15.3
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        6.0        9.4
## Morgan20_uterine  0.5700 [0.2509; 1.2948]       21.5       24.1
## 
## Number of studies: k = 5
## 
##                          OR           95%-CI     z p-value
## Common effect model  0.8991 [0.6143; 1.3158] -0.55  0.5840
## Random effects model 0.9869 [0.5876; 1.6574] -0.05  0.9601
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1152 [0.0000; 2.9306]; tau = 0.3394 [0.0000; 1.7119]
##  I^2 = 31.7% [0.0%; 73.9%]; H = 1.21 [1.00; 1.96]
## 
## Test of heterogeneity:
##     Q d.f. p-value
##  5.86    4  0.2102
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_s_analysis_remove)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.9500 [0.7479; 1.2067]        5.2        7.2
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        5.3
## Tse9_mult         1.8800 [1.2379; 2.8551]        1.7        6.0
## Loperz10_mult     2.3100 [1.4284; 3.7357]        1.3        5.6
## Trabert11         1.0400 [0.9172; 1.1792]       18.7        7.7
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        4.2
## Marotta15         2.8600 [0.8533; 9.5862]        0.2        2.2
## Deng16            1.5800 [1.3973; 1.7866]       19.6        7.7
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        3.0
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.4
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.5
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.4        3.6
## Ahrens22          2.1000 [1.0127; 4.3546]        0.6        4.1
## Qu24              1.2800 [1.1701; 1.4002]       36.7        7.8
## Chen25_mult       2.0900 [1.1543; 3.7841]        0.8        4.9
## Li26_mult         1.9100 [1.3912; 2.6222]        2.9        6.7
## Parada27_mult     0.8000 [0.5583; 1.1464]        2.3        6.4
## stro              1.4100 [1.0805; 1.8400]        4.2        7.0
## Duan31_mult       1.5700 [1.1493; 2.1447]        3.0        6.7
## 
## Number of studies: k = 19
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2902 [1.2219; 1.3623] 9.18 < 0.0001
## Random effects model 1.3312 [1.0776; 1.6446] 2.65   0.0080
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1473 [0.0622; 0.5378]; tau = 0.3838 [0.2495; 0.7334]
##  I^2 = 77.8% [65.8%; 85.6%]; H = 2.12 [1.71; 2.63]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  81.08   18 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
# average OR
summary(meta_a_analysis_cc)
##                   OR           95%-CI %W(common) %W(random)
## Wu2_multi     0.8950 [0.7079; 1.1316]        5.5        8.9
## Tse9_mult     1.7700 [1.1655; 2.6881]        1.7        6.9
## Loperz10_mult 1.5200 [0.9089; 2.5419]        1.1        5.9
## Trabert11     1.0400 [0.9172; 1.1792]       19.2        9.9
## Zhang14       0.3800 [0.1888; 0.7650]        0.6        4.4
## Deng16        1.5800 [1.3973; 1.7866]       20.1        9.9
## Zhou17        3.5700 [1.3702; 9.3013]        0.3        2.9
## Ahrens22      2.1000 [1.0127; 4.3546]        0.6        4.1
## Qu24          1.2800 [1.1701; 1.4002]       37.6       10.1
## Chen25_mult   2.0700 [1.1061; 3.8738]        0.8        4.9
## Li26_mult     1.1800 [0.8472; 1.6434]        2.8        7.9
## Parada27_mult 0.7680 [0.5351; 1.1022]        2.3        7.5
## Jia28         1.4100 [1.0805; 1.8400]        4.3        8.6
## Duan31_mult   1.4730 [1.0750; 2.0183]        3.1        8.1
## 
## Number of studies: k = 14
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2635 [1.1958; 1.3350] 8.33 < 0.0001
## Random effects model 1.2757 [1.0528; 1.5458] 2.49   0.0130
## 
## Quantifying heterogeneity:
##  tau^2 = 0.0932 [0.0431; 0.5927]; tau = 0.3053 [0.2076; 0.7699]
##  I^2 = 79.2% [65.7%; 87.3%]; H = 2.19 [1.71; 2.81]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  62.43   13 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_a_analysis_cs)
##                       OR           95%-CI %W(common) %W(random)
## Morgan3           0.7600 [0.4471; 1.2917]       51.5       37.1
## Marotta15         2.8600 [0.8533; 9.5862]        9.9       14.1
## Morgan20_cervical 1.3300 [0.4216; 4.1957]       11.0       15.3
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        6.0        9.4
## Morgan20_uterine  0.5700 [0.2509; 1.2948]       21.5       24.1
## 
## Number of studies: k = 5
## 
##                          OR           95%-CI     z p-value
## Common effect model  0.8991 [0.6143; 1.3158] -0.55  0.5840
## Random effects model 0.9869 [0.5876; 1.6574] -0.05  0.9601
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1152 [0.0000; 2.9306]; tau = 0.3394 [0.0000; 1.7119]
##  I^2 = 31.7% [0.0%; 73.9%]; H = 1.21 [1.00; 1.96]
## 
## Test of heterogeneity:
##     Q d.f. p-value
##  5.86    4  0.2102
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_a_analysis_remove)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.8950 [0.7079; 1.1316]        5.4        7.7
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        5.1
## Tse9_mult         1.7700 [1.1655; 2.6881]        1.7        6.0
## Loperz10_mult     1.5200 [0.9089; 2.5419]        1.1        5.2
## Trabert11         1.0400 [0.9172; 1.1792]       18.8        8.4
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        3.9
## Marotta15         2.8600 [0.8533; 9.5862]        0.2        1.8
## Deng16            1.5800 [1.3973; 1.7866]       19.7        8.4
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        2.6
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.0
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.2
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.4        3.2
## Ahrens22          2.1000 [1.0127; 4.3546]        0.6        3.7
## Qu24              1.2800 [1.1701; 1.4002]       36.9        8.6
## Chen25_mult       2.0700 [1.1061; 3.8738]        0.8        4.4
## Li26_mult         1.1800 [0.8472; 1.6434]        2.7        6.8
## Parada27_mult     0.7680 [0.5351; 1.1022]        2.3        6.6
## Jia28             1.4100 [1.0805; 1.8400]        4.2        7.4
## Duan31_mult       1.4730 [1.0750; 2.0183]        3.0        7.0
## 
## Number of studies: k = 19
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2547 [1.1882; 1.3250] 8.16 < 0.0001
## Random effects model 1.2328 [1.0255; 1.4822] 2.23   0.0259
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1007 [0.0421; 0.4776]; tau = 0.3173 [0.2053; 0.6911]
##  I^2 = 74.8% [60.5%; 83.9%]; H = 1.99 [1.59; 2.49]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  71.29   18 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
# Forest plot
# strong effect of OR
#pdf(file = "forestplot_strongeffect_cc.pdf", width = 12, height = 10)
forest(meta_s_analysis_cc, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

#pdf(file = "forestplot_strongeffect_cs.pdf", width = 12, height = 10)
forest(meta_s_analysis_cs, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

# average OR
#pdf(file = "forestplot_average_cc.pdf", width = 12, height = 10)
forest(meta_a_analysis_cc, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

#pdf(file = "forestplot_average_cs.pdf", width = 12, height = 10)
forest(meta_a_analysis_cs, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

#dev.off()
# Funnel plot 
# strong effect of OR
#pdf(file = "fuunelplot_strongeffect_cc.pdf", width = 12, height = 10)
funnel(meta_s_analysis_cc)

#pdf(file = "fuunelplot_strongeffect_cs.pdf", width = 12, height = 10)
funnel(meta_s_analysis_cs)

# average OR
#pdf(file = "fuunelplot_average_cc.pdf", width = 12, height = 10)
funnel(meta_a_analysis_cc)

#pdf(file = "fuunelplot_average_cs.pdf", width = 12, height = 10)
funnel(meta_s_analysis_cs)

#dev.off()

Assess the publication bias subgroup study design, case control

# assess the asymmetry of funnel plot and publication bias
# Conduct the meta-analysis using rma() function from metafor
# strong effect of OR
meta_s_analysis_rma_cc <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_s_sen, study_design == "case-control"))

# Perform Egger's test for publication bias
eggers_test_s_cc <- regtest(meta_s_analysis_rma_cc, model = "lm")

# Output the results of Egger's test
summary(eggers_test_s_cc$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.0165 -2.0335  0.7715  1.4064  3.3622 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt   0.1999     0.1114   1.795   0.0979 .
## Xsei       0.7462     1.0617   0.703   0.4956  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.395 on 12 degrees of freedom
## Multiple R-squared:  0.5676, Adjusted R-squared:  0.4955 
## F-statistic: 7.876 on 2 and 12 DF,  p-value: 0.006536
# average OR
meta_a_analysis_rma_cc <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_a_sen, study_design == "case-control"))

# Perform Egger's test for publication bias
eggers_test_a_cc <- regtest(meta_a_analysis_rma_cc, model = "lm")

# Output the results of Egger's test
summary(eggers_test_a_cc$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.4464 -2.1832  0.6999  1.4205  3.6008 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt   0.2251     0.1054   2.135   0.0541 .
## Xsei       0.1054     1.0034   0.105   0.9181  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.28 on 12 degrees of freedom
## Multiple R-squared:  0.5267, Adjusted R-squared:  0.4478 
## F-statistic: 6.676 on 2 and 12 DF,  p-value: 0.01125
# Begg's Test
# strong effect of OR
begg_test_s_cc <- ranktest(meta_s_analysis_rma_cc)
print(begg_test_s_cc)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.1429, p = 0.5183
# average OR
begg_test_a_cc <- ranktest(meta_a_analysis_rma_cc)
print(begg_test_a_cc)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.2088, p = 0.3308
# Trim and Fill Method
# strong effect of OR
trimfill_result_s_cc <- trimfill(meta_s_analysis_rma_cc, estimator = "R0")
print(trimfill_result_s_cc)
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 14; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.1375 (SE = 0.0693)
## tau (square root of estimated tau^2 value):      0.3707
## I^2 (total heterogeneity / total variability):   91.25%
## H^2 (total variability / sampling variability):  11.43
## 
## Test for Heterogeneity:
## Q(df = 13) = 71.6923, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub     
##   0.3349  0.1137  2.9448  0.0032  0.1120  0.5578  ** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# average OR
trimfill_result_a_cc <- trimfill(meta_a_analysis_rma_cc, estimator = "R0")
print(trimfill_result_a_cc)
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 14; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.0932 (SE = 0.0507)
## tau (square root of estimated tau^2 value):      0.3053
## I^2 (total heterogeneity / total variability):   87.55%
## H^2 (total variability / sampling variability):  8.03
## 
## Test for Heterogeneity:
## Q(df = 13) = 62.4297, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub    
##   0.2435  0.0980  2.4851  0.0130  0.0515  0.4355  * 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Assess the publication bias subgroup study design, cross sectional

# assess the asymmetry of funnel plot and publication bias
# Conduct the meta-analysis using rma() function from metafor
# strong effect of OR
meta_s_analysis_rma_cs <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_s_sen, study_design == "cross-sectional"))

# Perform Egger's test for publication bias
eggers_test_s_cs <- regtest(meta_s_analysis_rma_cs, model = "lm")

# Output the results of Egger's test
summary(eggers_test_s_cs$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##        1        2        3        4        5 
##  0.35744  1.18034  0.04209 -0.41607 -1.16380 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)
## Xintrcpt  -0.9129     0.5236  -1.744    0.180
## Xsei       2.0019     1.2051   1.661    0.195
## 
## Residual standard error: 1.008 on 3 degrees of freedom
## Multiple R-squared:  0.5045, Adjusted R-squared:  0.1741 
## F-statistic: 1.527 on 2 and 3 DF,  p-value: 0.3488
# average OR
meta_a_analysis_rma_cs <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_a_sen, study_design == "cross-sectional"))

# Perform Egger's test for publication bias
eggers_test_a_cs <- regtest(meta_a_analysis_rma_cs, model = "lm")

# Output the results of Egger's test
summary(eggers_test_a_cs$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##        1        2        3        4        5 
##  0.35744  1.18034  0.04209 -0.41607 -1.16380 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)
## Xintrcpt  -0.9129     0.5236  -1.744    0.180
## Xsei       2.0019     1.2051   1.661    0.195
## 
## Residual standard error: 1.008 on 3 degrees of freedom
## Multiple R-squared:  0.5045, Adjusted R-squared:  0.1741 
## F-statistic: 1.527 on 2 and 3 DF,  p-value: 0.3488
# Begg's Test
# strong effect of OR
begg_test_s_cs <- ranktest(meta_s_analysis_rma_cs)
print(begg_test_s_cs)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.4000, p = 0.4833
# average OR
begg_test_a_cs <- ranktest(meta_a_analysis_rma_cs)
print(begg_test_a_cs)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.4000, p = 0.4833
# Trim and Fill Method
# strong effect of OR
trimfill_result_s_cs <- trimfill(meta_s_analysis_rma_cs, estimator = "R0")
print(trimfill_result_s_cs)
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 5; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.1152 (SE = 0.2439)
## tau (square root of estimated tau^2 value):      0.3394
## I^2 (total heterogeneity / total variability):   33.57%
## H^2 (total variability / sampling variability):  1.51
## 
## Test for Heterogeneity:
## Q(df = 4) = 5.8560, p-val = 0.2102
## 
## Model Results:
## 
## estimate      se     zval    pval    ci.lb   ci.ub    
##  -0.0132  0.2645  -0.0500  0.9601  -0.5317  0.5052    
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# average OR
trimfill_result_a_cs <- trimfill(meta_a_analysis_rma_cs, estimator = "R0")
print(trimfill_result_a_cs)
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 5; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.1152 (SE = 0.2439)
## tau (square root of estimated tau^2 value):      0.3394
## I^2 (total heterogeneity / total variability):   33.57%
## H^2 (total variability / sampling variability):  1.51
## 
## Test for Heterogeneity:
## Q(df = 4) = 5.8560, p-val = 0.2102
## 
## Model Results:
## 
## estimate      se     zval    pval    ci.lb   ci.ub    
##  -0.0132  0.2645  -0.0500  0.9601  -0.5317  0.5052    
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Part 4, subgroup sample method, urine (= 1) vs other (= 0, 2, and 3)

# re-code the data
# strong effect of OR
meta_data_s_sm <- meta_data_s_remove %>% 
  mutate(
    samplemethod_code = ifelse(sample_method %in% c("1", "2"), 1, 0) # urine = 1, other = 0
  ) 

# average OR
meta_data_a_sm <- meta_data_a_remove %>% 
  mutate(
    samplemethod_code = ifelse(sample_method %in% c("1", "2"), 1, 0) # urine = 1, other = 0
  )
# strong effect of OR, urine = 1, other = 0
# urine sample method
meta_s_analysis_ur <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_s_sm, samplemethod_code == "1"),
  sm = "OR"
)

# other sample method
meta_s_analysis_ot <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_s_sm, samplemethod_code == "0"),
  sm = "OR"
)

# average OR, urine = 1, other = 0 
# urine sample method
meta_a_analysis_ur <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_a_sm, samplemethod_code == "1"),
  sm = "OR"
)

# other sample method
meta_a_analysis_ot <- metagen(
  TE = log_odds_ratio,
  seTE = se_log_odds_ratio,
  studlab = paste(auther),
  data = subset(meta_data_a_sm, samplemethod_code == "0"),
  sm = "OR"
)

# Summary of the meta-analysis
# strong effect of OR
summary(meta_s_analysis_ur)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.9500 [0.7479; 1.2067]        5.3        8.1
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        6.0
## Loperz10_mult     2.3100 [1.4284; 3.7357]        1.3        6.4
## Trabert11         1.0400 [0.9172; 1.1792]       19.2        8.7
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        4.9
## Deng16            1.5800 [1.3973; 1.7866]       20.1        8.7
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        3.5
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.8
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.8
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.5        4.2
## Qu24              1.2800 [1.1701; 1.4002]       37.7        8.8
## Chen25_mult       2.0900 [1.1543; 3.7841]        0.9        5.6
## Li26_mult         1.9100 [1.3912; 2.6222]        3.0        7.6
## Parada27_mult     0.8000 [0.5583; 1.1464]        2.3        7.3
## stro              1.4100 [1.0805; 1.8400]        4.3        8.0
## Duan31_mult       1.5700 [1.1493; 2.1447]        3.1        7.7
## 
## Number of studies: k = 16
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2761 [1.2078; 1.3484] 8.68 < 0.0001
## Random effects model 1.2482 [0.9921; 1.5705] 1.89   0.0585
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1539 [0.0628; 0.6127]; tau = 0.3924 [0.2505; 0.7828]
##  I^2 = 79.8% [68.1%; 87.3%]; H = 2.23 [1.77; 2.80]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  74.43   15 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_s_analysis_ot)
##               OR           95%-CI %W(common) %W(random)
## Tse9_mult 1.8800 [1.2379; 2.8551]       69.1       69.1
## Marotta15 2.8600 [0.8533; 9.5862]        8.2        8.2
## Ahrens22  2.1000 [1.0127; 4.3546]       22.7       22.7
## 
## Number of studies: k = 3
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.9956 [1.4101; 2.8243] 3.90 < 0.0001
## Random effects model 1.9956 [1.4101; 2.8243] 3.90 < 0.0001
## 
## Quantifying heterogeneity:
##  tau^2 = 0 [0.0000; 1.6115]; tau = 0 [0.0000; 1.2694]
##  I^2 = 0.0% [0.0%; 89.6%]; H = 1.00 [1.00; 3.10]
## 
## Test of heterogeneity:
##     Q d.f. p-value
##  0.44    2  0.8036
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_s_analysis_remove)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.9500 [0.7479; 1.2067]        5.2        7.2
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        5.3
## Tse9_mult         1.8800 [1.2379; 2.8551]        1.7        6.0
## Loperz10_mult     2.3100 [1.4284; 3.7357]        1.3        5.6
## Trabert11         1.0400 [0.9172; 1.1792]       18.7        7.7
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        4.2
## Marotta15         2.8600 [0.8533; 9.5862]        0.2        2.2
## Deng16            1.5800 [1.3973; 1.7866]       19.6        7.7
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        3.0
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.4
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.5
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.4        3.6
## Ahrens22          2.1000 [1.0127; 4.3546]        0.6        4.1
## Qu24              1.2800 [1.1701; 1.4002]       36.7        7.8
## Chen25_mult       2.0900 [1.1543; 3.7841]        0.8        4.9
## Li26_mult         1.9100 [1.3912; 2.6222]        2.9        6.7
## Parada27_mult     0.8000 [0.5583; 1.1464]        2.3        6.4
## stro              1.4100 [1.0805; 1.8400]        4.2        7.0
## Duan31_mult       1.5700 [1.1493; 2.1447]        3.0        6.7
## 
## Number of studies: k = 19
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2902 [1.2219; 1.3623] 9.18 < 0.0001
## Random effects model 1.3312 [1.0776; 1.6446] 2.65   0.0080
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1473 [0.0622; 0.5378]; tau = 0.3838 [0.2495; 0.7334]
##  I^2 = 77.8% [65.8%; 85.6%]; H = 2.12 [1.71; 2.63]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  81.08   18 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
# average OR
summary(meta_a_analysis_ur)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.8950 [0.7079; 1.1316]        5.5        8.8
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        5.7
## Loperz10_mult     1.5200 [0.9089; 2.5419]        1.2        5.8
## Trabert11         1.0400 [0.9172; 1.1792]       19.3        9.7
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        4.3
## Deng16            1.5800 [1.3973; 1.7866]       20.2        9.7
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        2.8
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.2
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.3
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.5        3.5
## Qu24              1.2800 [1.1701; 1.4002]       37.8        9.9
## Chen25_mult       2.0700 [1.1061; 3.8738]        0.8        4.8
## Li26_mult         1.1800 [0.8472; 1.6434]        2.8        7.7
## Parada27_mult     0.7680 [0.5351; 1.1022]        2.3        7.4
## Jia28             1.4100 [1.0805; 1.8400]        4.3        8.4
## Duan31_mult       1.4730 [1.0750; 2.0183]        3.1        7.9
## 
## Number of studies: k = 16
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2414 [1.1748; 1.3118] 7.68 < 0.0001
## Random effects model 1.1566 [0.9561; 1.3992] 1.50   0.1343
## 
## Quantifying heterogeneity:
##  tau^2 = 0.0933 [0.0371; 0.5100]; tau = 0.3055 [0.1927; 0.7141]
##  I^2 = 76.9% [62.7%; 85.7%]; H = 2.08 [1.64; 2.64]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  64.84   15 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_a_analysis_ot)
##               OR           95%-CI %W(common) %W(random)
## Tse9_mult 1.7700 [1.1655; 2.6881]       69.1       69.1
## Marotta15 2.8600 [0.8533; 9.5862]        8.2        8.2
## Ahrens22  2.1000 [1.0127; 4.3546]       22.7       22.7
## 
## Number of studies: k = 3
## 
##                          OR           95%-CI    z p-value
## Common effect model  1.9142 [1.3526; 2.7090] 3.66  0.0002
## Random effects model 1.9142 [1.3526; 2.7090] 3.66  0.0002
## 
## Quantifying heterogeneity:
##  tau^2 = 0 [0.0000; 2.0963]; tau = 0 [0.0000; 1.4479]
##  I^2 = 0.0% [0.0%; 89.6%]; H = 1.00 [1.00; 3.10]
## 
## Test of heterogeneity:
##     Q d.f. p-value
##  0.62    2  0.7333
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
summary(meta_a_analysis_remove)
##                       OR           95%-CI %W(common) %W(random)
## Wu2_multi         0.8950 [0.7079; 1.1316]        5.4        7.7
## Morgan3           0.7600 [0.4471; 1.2917]        1.1        5.1
## Tse9_mult         1.7700 [1.1655; 2.6881]        1.7        6.0
## Loperz10_mult     1.5200 [0.9089; 2.5419]        1.1        5.2
## Trabert11         1.0400 [0.9172; 1.1792]       18.8        8.4
## Zhang14           0.3800 [0.1888; 0.7650]        0.6        3.9
## Marotta15         2.8600 [0.8533; 9.5862]        0.2        1.8
## Deng16            1.5800 [1.3973; 1.7866]       19.7        8.4
## Zhou17            3.5700 [1.3702; 9.3013]        0.3        2.6
## Morgan20_cervical 1.3300 [0.4216; 4.1957]        0.2        2.0
## Morgan20_ovarian  1.4100 [0.2984; 6.6632]        0.1        1.2
## Morgan20_uterine  0.5700 [0.2509; 1.2948]        0.4        3.2
## Ahrens22          2.1000 [1.0127; 4.3546]        0.6        3.7
## Qu24              1.2800 [1.1701; 1.4002]       36.9        8.6
## Chen25_mult       2.0700 [1.1061; 3.8738]        0.8        4.4
## Li26_mult         1.1800 [0.8472; 1.6434]        2.7        6.8
## Parada27_mult     0.7680 [0.5351; 1.1022]        2.3        6.6
## Jia28             1.4100 [1.0805; 1.8400]        4.2        7.4
## Duan31_mult       1.4730 [1.0750; 2.0183]        3.0        7.0
## 
## Number of studies: k = 19
## 
##                          OR           95%-CI    z  p-value
## Common effect model  1.2547 [1.1882; 1.3250] 8.16 < 0.0001
## Random effects model 1.2328 [1.0255; 1.4822] 2.23   0.0259
## 
## Quantifying heterogeneity:
##  tau^2 = 0.1007 [0.0421; 0.4776]; tau = 0.3173 [0.2053; 0.6911]
##  I^2 = 74.8% [60.5%; 83.9%]; H = 1.99 [1.59; 2.49]
## 
## Test of heterogeneity:
##      Q d.f.  p-value
##  71.29   18 < 0.0001
## 
## Details on meta-analytical method:
## - Inverse variance method
## - Restricted maximum-likelihood estimator for tau^2
## - Q-Profile method for confidence interval of tau^2 and tau
# Forest plot
# strong effect of OR
#pdf(file = "forestplot_strongeffect_ur.pdf", width = 12, height = 10)
forest(meta_s_analysis_ur, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

#pdf(file = "forestplot_strongeffect_ot.pdf", width = 12, height = 10)
forest(meta_s_analysis_ot, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

# average OR
#pdf(file = "forestplot_average_ur.pdf", width = 12, height = 10)
forest(meta_a_analysis_ur, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

#pdf(file = "forestplot_average_ot.pdf", width = 12, height = 10)
forest(meta_a_analysis_ot, 
       sortvar = TE,
       prediction = TRUE,
       leftlabs = c("Author", "g", "SE")
       )

#dev.off()
# Funnel plot 
# strong effect of OR
#pdf(file = "fuunelplot_strongeffect_ur.pdf", width = 12, height = 10)
funnel(meta_s_analysis_ur)

#pdf(file = "fuunelplot_strongeffect_ot.pdf", width = 12, height = 10)
funnel(meta_s_analysis_ot)

# average OR
#pdf(file = "fuunelplot_average_ur.pdf", width = 12, height = 10)
funnel(meta_a_analysis_ur)

#pdf(file = "fuunelplot_average_ot.pdf", width = 12, height = 10)
funnel(meta_s_analysis_ot)

#dev.off()

Assess the publication bias, subgroup sample method, urine (= 1)

# assess the asymmetry of funnel plot and publication bias
# Conduct the meta-analysis using rma() function from metafor
# strong effect of OR
meta_s_analysis_rma_ur <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_s_sm, samplemethod_code == "1"))

# Perform Egger's test for publication bias
eggers_test_s_ur <- regtest(meta_s_analysis_rma_ur, model = "lm")

# Output the results of Egger's test
summary(eggers_test_s_ur$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.2773 -1.9511  0.2315  1.8617  3.3520 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt  0.25686    0.09948   2.582   0.0217 *
## Xsei     -0.15264    0.88524  -0.172   0.8656  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.303 on 14 degrees of freedom
## Multiple R-squared:  0.5041, Adjusted R-squared:  0.4332 
## F-statistic: 7.115 on 2 and 14 DF,  p-value: 0.007379
# average OR
meta_a_analysis_rma_ur <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_a_sm, samplemethod_code == "1"))

# Perform Egger's test for publication bias
eggers_test_a_ur <- regtest(meta_a_analysis_rma_ur, model = "lm")

# Output the results of Egger's test
summary(eggers_test_a_ur$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.9566 -1.6262  0.3912  1.2152  3.6340 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt  0.26683    0.09089   2.936   0.0109 *
## Xsei     -0.59362    0.80732  -0.735   0.4743  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.112 on 14 degrees of freedom
## Multiple R-squared:  0.496,  Adjusted R-squared:  0.424 
## F-statistic: 6.889 on 2 and 14 DF,  p-value: 0.008259
# Begg's Test
# strong effect of OR
begg_test_s_ur <- ranktest(meta_s_analysis_rma_ur)
print(begg_test_s_ur)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.0000, p = 1.0000
# average OR
begg_test_a_ur <- ranktest(meta_a_analysis_rma_ur)
print(begg_test_a_ur)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 0.0000, p = 1.0000
# Trim and Fill Method
# strong effect of OR
trimfill_result_s_ur <- trimfill(meta_s_analysis_rma_ur, estimator = "R0")
print(trimfill_result_s_ur)
## 
## Estimated number of missing studies on the right side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the right side:      p-val = 0.5000
## 
## Random-Effects Model (k = 16; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.1539 (SE = 0.0764)
## tau (square root of estimated tau^2 value):      0.3924
## I^2 (total heterogeneity / total variability):   90.96%
## H^2 (total variability / sampling variability):  11.06
## 
## Test for Heterogeneity:
## Q(df = 15) = 74.4273, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval    ci.lb   ci.ub    
##   0.2217  0.1172  1.8922  0.0585  -0.0079  0.4514  . 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# average OR
trimfill_result_a_ur <- trimfill(meta_a_analysis_rma_ur, estimator = "R0")
print(trimfill_result_a_ur)
## 
## Estimated number of missing studies on the right side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the right side:      p-val = 0.5000
## 
## Random-Effects Model (k = 16; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0.0933 (SE = 0.0512)
## tau (square root of estimated tau^2 value):      0.3055
## I^2 (total heterogeneity / total variability):   85.84%
## H^2 (total variability / sampling variability):  7.06
## 
## Test for Heterogeneity:
## Q(df = 15) = 64.8440, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval    ci.lb   ci.ub    
##   0.1455  0.0972  1.4974  0.1343  -0.0449  0.3359    
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Assess the publication bias, subgroup sample method, other (= 0, 2, and 3)

# assess the asymmetry of funnel plot and publication bias
# Conduct the meta-analysis using rma() function from metafor
# strong effect of OR
meta_s_analysis_rma_ot <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_s_sm, samplemethod_code == "0"))

# Perform Egger's test for publication bias
eggers_test_s_ot <- regtest(meta_s_analysis_rma_ot, model = "lm")

# Output the results of Egger's test
summary(eggers_test_s_ot$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##        1        2        3 
##  0.03285  0.06167 -0.09452 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt  0.41922    0.05332   7.862   0.0805 .
## Xsei      0.96183    0.17374   5.536   0.1138  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1175 on 1 degrees of freedom
## Multiple R-squared:  0.9991, Adjusted R-squared:  0.9974 
## F-statistic: 565.6 on 2 and 1 DF,  p-value: 0.02972
# average OR
meta_a_analysis_rma_ot <- rma(yi = log_odds_ratio, sei = se_log_odds_ratio, method = "REML", data = subset(meta_data_a_sm, samplemethod_code == "0"))

# Perform Egger's test for publication bias
eggers_test_a_ot <- regtest(meta_a_analysis_rma_ot, model = "lm")

# Output the results of Egger's test
summary(eggers_test_a_ot$fit)
## 
## Call:
## lm(formula = yi ~ X - 1, weights = 1/vi)
## 
## Weighted Residuals:
##        1        2        3 
##  0.01076  0.02020 -0.03096 
## 
## Coefficients:
##          Estimate Std. Error t value Pr(>|t|)  
## Xintrcpt  0.32079    0.01747   18.36   0.0346 *
## Xsei      1.16279    0.05691   20.43   0.0311 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.0385 on 1 degrees of freedom
## Multiple R-squared:  0.9999, Adjusted R-squared:  0.9997 
## F-statistic:  4738 on 2 and 1 DF,  p-value: 0.01027
# Begg's Test
# strong effect of OR
begg_test_s_ot <- ranktest(meta_s_analysis_rma_ot)
print(begg_test_s_ot)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 1.0000, p = 0.3333
# average OR
begg_test_a_ot <- ranktest(meta_a_analysis_rma_ot)
print(begg_test_a_ot)
## 
## Rank Correlation Test for Funnel Plot Asymmetry
## 
## Kendall's tau = 1.0000, p = 0.3333
# Trim and Fill Method
# strong effect of OR
trimfill_result_s_ot <- trimfill(meta_s_analysis_rma_ot, estimator = "R0")
print(trimfill_result_s_ot)
## 
## Estimated number of missing studies on the left side: 0 (SE = 1.4142)
## Test of H0: no missing studies on the left side:      p-val = 0.5000
## 
## Random-Effects Model (k = 3; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0 (SE = 0.1194)
## tau (square root of estimated tau^2 value):      0
## I^2 (total heterogeneity / total variability):   0.00%
## H^2 (total variability / sampling variability):  1.00
## 
## Test for Heterogeneity:
## Q(df = 2) = 0.4372, p-val = 0.8036
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub      
##   0.6910  0.1772  3.8995  <.0001  0.3437  1.0382  *** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# average OR
trimfill_result_a_ot <- trimfill(meta_a_analysis_rma_ot, estimator = "R0")
print(trimfill_result_a_ot)
## 
## Estimated number of missing studies on the left side: 1 (SE = 2.0000)
## Test of H0: no missing studies on the left side:      p-val = 0.2500
## 
## Random-Effects Model (k = 4; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 0 (SE = 0.1109)
## tau (square root of estimated tau^2 value):      0
## I^2 (total heterogeneity / total variability):   0.00%
## H^2 (total variability / sampling variability):  1.00
## 
## Test for Heterogeneity:
## Q(df = 3) = 1.1646, p-val = 0.7615
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub      
##   0.6132  0.1703  3.6007  0.0003  0.2794  0.9470  *** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1